/*package main

import ("fmt"
        "io"
		"log"
		"net/http"
		"net/url"
	)

func testGet(){
	// https://www.juhe.cn/box/index/id/73
url := "http://apis.juhe.cn/simpleWeather/query?key=087d7d10f700d20e27bb753cd806e40b&city=上海"
r,err := http.Get(url)
if err !=nil{
	log.Fatal(err)
}
defer r.Body.Close()
b,_ := io.ReadAll(r.Body)
fmt.Printf("b:%v\n",string(b))
}

func testGet2(){
	params :=url.Values{}
	Url,err := url.Parse("http://apis.juhe.cn/simpleWeather/query")
	if err != nil{
		return
	}
	params.Set("key","087d7d10f700d20e27bb753cd806e40b")
	params.Set("city","北京")

	Url.RawQuery = params.Encode()
	urlPath := Url.String()
	fmt.Println(urlPath)
	resp,err :=http.Get(urlPath)
	if err != nil{
		log.Fatal(err)
	}
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}

func testParseJson(){
	type result struct{
		Args string  `json:"args"`
		Url  string  `json:"url"`	}
}

func main() {
	testGet()
	//testGet2()

}
	*/